package com.chenliang.provider.service.impl;


import com.chenliang.provider.service.AmqpService;
import com.chenliang.provider.service.GoodsService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @program: sendRabbitMqMsg
 * @description:
 * @author: 陈亮
 * @create: 2022-05-05 21:05
 */
@Service
public class GoodsServiceImpl implements GoodsService {

    @Resource
    private AmqpService amqpService;

    @Override
    public void send() {
        // amqpService.send("providerExchange","user.chenliang","user");
        // amqpService.send("providerExchange","goods.chenliang","goods");

        amqpService.send("logs", "user.a", "1122");

    }


    @Override
    public void send1() {
        for (int i = 0; i < 10; i++) {
            amqpService.send("logs", "user.a", i);
        }
    }
}
